<?php
/*** Changing footer using Hook */
add_filter('genesis_footer_output', 'footer_output_filter', 10, 3);

function footer_output_filter($output, $backtotop_text, $creds_text) {
 //$backtotop_text = '[footer_backtotop text="Top of Page"]';
 $links_footer	= 	'<a href="htt://www.themlmattorney.com/">Home</a> . '.
 					'<a href="http://www.themlmattorney.com/terms/">Terms of Service</a> . '.
					'<a href="http://www.themlmattorney.com/sitemap/">Sitemap</a> ';
 $creds_text = 'Copyright [footer_copyright] <a href="'. trailingslashit( get_bloginfo('url') ) .'" title="'. esc_attr( get_bloginfo('name') ) .' rel="nofollow">'.get_bloginfo('name').'</a> &middot; <a href="http://affiliate-link-to-genesis.com" target="_blank" rel="nofollow">Genesis Theme Framework</a>';
 $output = '<div class="links">' . $links_footer . '</div>' . '<div class="creds">' . $creds_text . '</div>';
 return $output;
}


/** Start the engine */
require_once( get_template_directory() . '/lib/init.php' );
require_once( get_stylesheet_directory() . '/lib/style.php' );

/** Child theme (do not remove) */
define( 'CHILD_THEME_NAME', 'Copyblogger Theme' );
define( 'CHILD_THEME_URL', 'http://www.copyblogger.com/copyblogger-theme-wordpress/' );

/** Add Viewport meta tag for mobile browsers */
add_action( 'genesis_meta', 'copyblogger_viewport_meta_tag' );
function copyblogger_viewport_meta_tag() {
	echo '<meta name="viewport" content="width=device-width, initial-scale=1.0"/>';
}

/** Add support for custom background */
add_custom_background();

/** Relocate the post info function */
remove_action('genesis_before_post_content', 'genesis_post_info');
add_action('genesis_before_post_title', 'genesis_post_info');

/** Customize the post info function */
add_filter( 'genesis_post_info', 'post_info_filter' );
function post_info_filter($post_info) {
if (!is_page()) {
    $post_info = '<span class="italic">by</span> [post_author_posts_link] <span class="italic">on</span> [post_date] [post_comments] [post_edit]';
    return $post_info;
}}

/** Modify the size of the Gravatar in the author box */
add_filter('genesis_author_box_gravatar_size', 'copyblogger_author_box_gravatar_size');
function copyblogger_author_box_gravatar_size($size) {
    return '78';
}

/** Add support for 3-column footer widgets */
add_theme_support( 'genesis-footer-widgets', 3 );


/* some shortcode for landing page by Najeeb */
function renderPage_landing( $atts ) {
	extract( shortcode_atts( array(
		'page_id' => '',
	), $atts ) );

	$content = get_post_field('post_content', "{$page_id}");
	return 'afasfa sfsdfas';
}
add_shortcode( 'render_page', 'renderPage_landing' );